import axios from 'axios'
import { ElNotification , ElMessageBox, ElMessage, ElLoading } from 'element-plus'


// 创建axios实例
const service = axios.create({
  // axios中请求配置有baseURL选项，表示请求URL公共部分
  baseURL: import.meta.env.VITE_APP_BASE_API,
  // 超时
  timeout: 10000
})
// request拦截器
service.interceptors.request.use(config => {
  const token='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYmYiOjE3MTMyNDI3MzMsImFjY2Vzc0tleSI6Ijk5YjcxOTVjMjg2OGY1MDRiMDJmZTA5MDRiNDc0NmM4IiwiZXhwIjoxNzEzODQ3NTMzLCJpYXQiOjE3MTMyNDI3MzN9.hAHf5yjcSwPW0URYq-95oG_o_VE3tQ1roa-U8zDNTgk';
  config.headers['Authorization']=token
  return config
}, error => {
    console.log(error)
    Promise.reject(error)
})



export default service
